#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<stdlib.h>
int main()
{
	//验证T状态
	//while(1)
	//{
	//	sleep(1);
	//	printf("i love you\n");
	//}
	
	//验证僵尸状态
/*	pid_t id =fork();
	if(id==0)
	{
		//child
		int cnt=5;
		while(cnt)
		{
		printf("i am a child process,pid:%d,ppid:%d\n",getpid(),getppid());
		sleep(1);
		cnt--;
		}
		exit(0);//结束直接退出进程
	}
	else
	{
		//father
		while(1)
		{
			printf("i am a father process,pid:%d,ppid:%d",getpid(),getppid());	
			sleep(1);
		}

		

	}*/

	//验证优先级
	while(1)
	{
		printf("i am a process, pid:%d\n",getpid());
		sleep(1);
	}
	return 0;
}
